<template>
    <div>
        {{$attrs.type}}
        <el-date-picker
            v-model="value"
            @change='change'
            style="width: 100%"
            :type="$attrs.type"
            :disabled='$attrs.disabled'
            :clearable="$attrs.clearable" 
            :formatter="$attrs.format" 
            :readonly="$attrs.readonly"
            :value-format='$attrs.valueFormat'
            :placeholder="$attrs.placeholder">
        </el-date-picker>
    </div>
</template>
<script>
  export default {
    data() {
        return {
            value: ''
        }
    },
    props: ['value'],
    watch: {
      value(val) {
        console.log(val,'jjj')
        this.value = val+''
      }
    },
     mounted(){
    },
    methods: {
        change(val) {
            this.$emit('input', val)
            this.$emit('change', val)
        }
    }
  }
  </script>